<!DOCTYPE html>
<%@ page language="java" contentType="text/html" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>

<html lang="en">

<head>
    <meta http-equiv="Content-Type" content="text/html;charset=UTF-8" />
    <title>course-work-management</title>
    <link rel="stylesheet" type="text/css" href="/course-work-management/css/lib/bootstrap.css">
    <link rel="stylesheet" type="text/css" href="/course-work-management/css/lib/bootstrap-formhelpers.css">
    <link rel="stylesheet" type="text/css" href="/course-work-management/css/lib/upload-file-btn.css">
    <link rel="stylesheet" type="text/css" href="/course-work-management/css/navbar.css">
    <link rel="stylesheet" type="text/css" href="/course-work-management/css/user-navbar.css">
    <link rel="icon" href="/course-work-management/img/logo.png" />
</head>

<body>
   <nav class="navbar navbar-default">
		<div class="container">
			<div class="navbar-header">
				<ul class="breadcrumb">
                    <li class="active">课程作业管理</li>
                    <li class="active">学生</li>
                </ul>
			</div>
			<ul class="nav navbar-nav navbar-right">
				<li><a href="#" class="dropdown-toggle" data-toggle="dropdown" disabled="true"> 
						<span class="glyphicon glyphicon-user"></span>
						<c:if test="${not empty userName}">${userName}</c:if>
					</a>
				</li>
				<li><a href="/course-work-management/logout"> <span class="glyphicon glyphicon-log-out"></span>注销</a></li>
			</ul>
		</div>
		</div>
	</nav>
    <div class="container">
    	<!-- alert message when remove course or student work -->
        <div class="row">
            <div class="col-md-4">
                <div class="panel panel-default">
                    <div class="panel-heading" id="courses">
                        <select class="form-control" style="width: 70%; display: inline-block;">
                        	<!--  display course options-->
                        </select>
                        <button class="btn btn-primary pull-right" style="margin-left: 5px;" data-toggle="modal" data-target="#addCourseModal" data-tooltip="true" data-placement="top" data-original-title="添加课程">
                            <span class="glyphicon glyphicon-plus"></span>
                        </button>
                        <button class="btn btn-danger pull-right" data-toggle="modal" data-target="#deleteCourseModal" data-tooltip="true" data-placement="top" data-original-title="退出课程">
                            <span class="glyphicon glyphicon-minus"></span>
                        </button>
                    </div>
                    <div class="panel-body" style="height: 480px; overflow: auto;" id="teacherWorks">
                        <div class="list-group">
                        	<!-- display teacher works -->
                        </div>
                    </div>
                </div>
            </div>
            <div class="col-md-8">
                <div class="panel panel-default">
                    <div class="panel-heading">
                        <ol class="breadcrumb" style="font-size: 1.2em; margin-bottom: 0px; padding: 5px;" data-id="" id="workPanelHeading">
                            <li></li>
                            <li></li>
                            <button class="btn btn-primary pull-right" style="margin-top: -5px; display: none;" data-toggle="modal", data-target="#addStudentWorkModal">
                                <span class="glyphicon glyphicon-upload"></span>提交作业
                            </button>
                        </ol>
                    </div>
                    <div class="panel-body" style="height: 480px; overflow: auto;">
                        <div id="workPanelContent">
                        	<h3 style="display: none;"><b>作业要求</b></h3>
                            <table class="table table-hover" style="margin-top: 10px;">
                            <!-- display current teacher work-->
                            </table>
                            <h3 style="display: none;"><b>我的作业</b></h3>
                            <table class="table table-hover" style="margin-top: 10px;">
                            <!-- display current submitted student work-->
                            </table>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <div class="container">
        <p class="text-center"><em><strong>Powered by LVZY.</strong></em></p>
    </div>
    
    <!-- Add Course Modal HTML -->
    <div id="addCourseModal" class="modal fade">
        <div class="modal-dialog modal-sm">
            <div class="modal-content">
                <div class="modal-header">
                    <button class="close" data-dismiss="modal" aria-hidden="true">x</button>
                    <h4 class="modal-title">添加课程</h4>
                </div>
                <div class="modal-body">
                	<form action=""> 
	                    <div class="form-group">
	                        <label class="control-label">课程名称:</label>
	                        <input type="text" class="form-control" name="courseName">
	                    </div>
	                    <div class="form-group">
	                        <label class="control-label">课程编号:</label>
	                        <select class="form-control" name="courseNo" >
	                            <option value="A">A</option>
	                            <option value="B">B</option>
	                            <option value="C">C</option>
	                            <option value="D">D</option>
	                        </select>
	                    </div>
	                 </form>
                </div>
                <div class="modal-footer">
                    <button class="btn btn-warning" data-dismiss="modal">取消</button>
                    <button class="btn btn-primary">保存</button>
                </div>
            </div>
        </div>
    </div>
    
    <!-- Delete Course Modal HTML -->
    <div id="deleteCourseModal" class="modal fade">
        <div class="modal-dialog modal-sm">
            <div class="modal-content">
                <div class="modal-header">
                    <button class="close" data-dismiss="modal" aria-hidden="true">x</button>
                    <h4 class="modal-title">Delete course</h4>
                </div>
                <div class="modal-body">
            		<p>Are you sure this course should be removed?</p>
                </div>
                <div class="modal-footer">
                    <button class="btn btn-warning" data-dismiss="modal">否</button>
                    <button class="btn btn-primary">是</button>
                </div>
            </div>
        </div>
    </div>
    
    <!-- Add student Work Modal HTML -->
    <div id="addStudentWorkModal" class="modal fade">
        <div class="modal-dialog modal-md">
            <div class="modal-content">
                <div class="modal-header">
                    <button class="close" data-dismiss="modal" aria-hidden="true">x</button>
                    <h4 class="modal-title">选择作业</h4>
                </div>
                <div class="modal-body">
                    <form class="form-horizontal">
                        <div class="form-group">
                            <label class="col-sm-2 control-label">作业附件:</label>
                            <div class="col-sm-10">
                                <div class="input-group">
                                    <input type="text" class="form-control" disabled="true" style="cursor: default;" placeholder=""/>
                                    <span class="input-group-btn">
                                        <button class="btn btn-primary btn-file" type="button">
                                            <span class="glyphicon glyphicon-folder-open"></span>
                                            <input type="file">
                                        </button>
                                    </span>
                                </div>
                            </div>
                        </div>
                    </form>
                </div>
                <div class="modal-footer">
                    <button class="btn btn-warning" data-dismiss="modal">取消</button>
                    <button class="btn btn-primary">上传</button>
                </div>
            </div>
        </div>
    </div>
    
    <script src="/course-work-management/js/lib/jquery-1.11.1.js"></script>
    <script src="/course-work-management/js/lib/bootstrap.js"></script>
    <script src="/course-work-management/js/lib/bootstrap-formhelpers.js"></script>
    <script src="/course-work-management/js/lib/time-format.js"></script>
    <script src="/course-work-management/js/container.js"></script>
    <script src="/course-work-management/js/student-index.js"></script>
</body>

</html>